package com.ys.nms.module.business.dal.mysql.ports;

import java.util.*;

import com.ys.nms.framework.common.pojo.PageResult;
import com.ys.nms.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.ys.nms.framework.mybatis.core.mapper.BaseMapperX;
import com.ys.nms.module.business.dal.dataobject.ports.PortsDO;
import org.apache.ibatis.annotations.Mapper;
import com.ys.nms.module.business.controller.admin.ports.vo.*;

/**
 * 端口 Mapper
 *
 * @author zzy
 */
@Mapper
public interface PortsMapper extends BaseMapperX<PortsDO> {

    default PageResult<PortsDO> selectPage(PortsPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<PortsDO>()
                .eqIfPresent(PortsDO::getPortId, reqVO.getPortId())
                .eqIfPresent(PortsDO::getDeviceId, reqVO.getDeviceId())
                .orderByDesc(PortsDO::getPortId));
    }

}